import request from '../../utils/request'

// 查询尾款跟进记录列表
export function getFollowUpList(params) {
    return request({
        url: '/system/followup/list',
        method: 'GET',
        params
    })
}

// 导出尾款跟进记录列表
export function exportFollowUpList(params) {
    return request({
        url: '/system/followup/export',
        method: 'POST',
        params,
        responseType: 'blob'
    })
}

// 获取尾款跟进记录详细信息
export function getFollowUpDetail(id) {
    return request({
        url: `/system/followup/${id}`,
        method: 'GET'
    })
}

// 新增尾款跟进记录
export function addFollowUp(data) {
    return request({
        url: '/system/followup',
        method: 'POST',
        data
    })
}

// 修改尾款跟进记录
export function updateFollowUp(data) {
    return request({
        url: '/system/followup',
        method: 'PUT',
        data
    })
}

// 删除尾款跟进记录
export function deleteFollowUp(ids) {
    return request({
        url: `/system/followup/${ids.join(',')}`,
        method: 'DELETE'
    })
}
